Skip to content

BENCH-481| resolves #537 | Changing timestamp to .proc.cp[] - #792

Merged
NiallMcC24 merged 1 commit into
masterfrom
I537-ConvertTimestamps
Dec 3, 2026
Merged

NiallMcC24 merged 1 commit into
masterfrom
I537-ConvertTimestamps

Conversation

@NiallMcC24

Copy link
Copy Markdown
Contributor

Problem

Issue raised in #537.
In the segmented tickerplant pubsub code, in the functions .stpps.upd.chained, .stpps.zts.def, and .stpps.zts.chained current time is defined by .z.p.
Instead of .z.p, could this be changed to use .proc.cp[]? It is causing some issues using .z.p as the definition

Fix

As suggested in the fix changed all locations which uses the timestamp .z.p and replaced it with the .proc.cp[]

Tests

Attempted to run the tests/stp/pubsub to confirm this fix worked. With this, the actual tests designed for pubsub was not correctly configured so the Tests never ran.

Fixes for tests

In the tests the process.csv was pointing to ${TORQHOME} rather than the ${TORQAPPHOME} for the passwords and where the database.q was being pointed to. This means that the discovery and ps processes couldn't initialize so none of the tests could be ran.
The pubsub.csv tests were trying to use the rdbHandle which is never mentioned anywhere within the code, and by changing this to the psHandle that was being used before these tests with the fixes above now run without any errors

image

Fig 1: The k4unit Test Results for the pubsub.csv. All showing without error

… unit tests to check that this change did not affect the data. However some of the tests were incorrectly written so that the tests would always fail. the changes in the tests/ folder are to resolve this to allow the testing to run with no errors
@NiallMcC24 NiallMcC24 self-assigned this Dec 2, 2026

@jamesrut1996 jamesrut1996 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use .proc.cp instead of .z.P?

@NiallMcC24

Copy link
Copy Markdown
Contributor Author

Why use .proc.cp instead of .z.P?

That it what .proc.cp's function does
q) .proc.cp --> {.z.P}
Was the convention we were told to use in SimPLE

@NiallMcC24
NiallMcC24 merged commit 93848d4 into master Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants